package com.poster.entity.vo;

import com.poster.enums.ResultCode;

import java.util.HashMap;

public class MapResultVo extends ResultVo<HashMap<String, Object>>{

    public static MapResultVo create(ResultCode resultCode){
        MapResultVo r = new MapResultVo();
        return (MapResultVo) r
                .setResultCode(resultCode)
                .setData(new HashMap<>());
    }

    public static MapResultVo create(){
        MapResultVo r = new MapResultVo();
        return (MapResultVo) r
                .setData(new HashMap<>());
    }

    public MapResultVo put(String key, Object data){
        getData().put(key, data);
        return this;
    }
}
